﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UtilZ.Dotnet.Ex.Base;
using UtilZ.Dotnet.Ex.ZLog;

namespace UtilZ.Dotnet.Ex.Model
{
    /// <summary>
    /// 缓存数据扩展类型接口
    /// </summary>
    public class TextBufferData : IBufferDataExtend
    {
        /// <summary>
        /// true:string;false:StringBuilder
        /// </summary>
        public bool Type { get; private set; }

        /// <summary>
        /// 字符串文本
        /// </summary>
        public string Text { get; private set; }

        /// <summary>
        /// 字符串文本
        /// </summary>
        public StringBuilder Builder { get; private set; }



        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="text">字符串文本</param>
        public TextBufferData(string text)
        {
            this.Text = text;
            this.Type = true;
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="builder">字符串文本</param>
        public TextBufferData(StringBuilder builder)
        {
            this.Builder = builder;
            this.Type = false;
        }

    }

}
